package com.itheima.controller;

import com.itheima.domain.Role;
import com.itheima.service.RoleService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 角色信息Controller
 * @Author: hsp
 * @Date: 2022/12/3-12-03-14:23
 * @Description: com.itheima.controller
 * @version: 1.0.0
 */
@RestController
@RequestMapping("/admin/role")
public class RoleController {

    @Resource
    private RoleService roleService;

    /**
     * 查询角色信息列表
     * @return
     */
    @GetMapping("/findAll")
    public List<Role> findAll () {
        return roleService.findAll();
    }


}
